package com.frank.entity;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

/**
 * @Author: huweifeng
 * @Date: 2022/11/27
 * @Description: Bean的生命周期
 **/
@Component
public class BeanLife2 implements InitializingBean, DisposableBean {
    public BeanLife2() {
        System.out.println("BeanLife2 constructor...");
    }
    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("BeanLife2 afterPropertiesSet...");
    }
    @Override
    public void destroy() throws Exception {
        System.out.println("BeanLife2 destroy...");
    }
}
